// gcc -o print-hello print-hello.c `pkg-config --cflags --libs caca`
// archlinx install deps:
// sudo pacman -S libcaca
#include <caca.h>

int main() {
	caca_canvas_t *cv;
	caca_display_t *dp;

	cv = caca_create_canvas(0, 0);
	dp = caca_create_display(cv);
	// set the color style
	caca_set_color_ansi(cv, CACA_WHITE, CACA_RED);
	// will output "Hello, libcaca" to the screen
	caca_put_str(cv, 10, 10, "Hello, libcaca");

	caca_refresh_display(dp);
	// press any key to exit
	caca_get_event(dp, CACA_EVENT_KEY_PRESS, NULL, -1);

	caca_free_display(dp);
	caca_free_canvas(cv);

	return 0;
}
